package cn.itsource.basic.util;

import cn.hutool.core.util.RandomUtil;
import cn.hutool.http.HttpUtil;
import org.springframework.stereotype.Component;

import java.util.HashMap;

@Component //交给spring管理
public class SendMessageService {

    public static void sendPhoneMessage(String phone,String code) {
        HashMap<String, Object> map = new HashMap<>();

        map.put("Uid", "lgyyds");
        map.put("key", "83E01846A879EDCB90BB2846CBC8CBE3");
        map.put("smsMob",phone);
        map.put("smsText",code+"，疯狂星期四(-2),VME50");
        HttpUtil.get("http://utf8.api.smschinese.cn/",map);
    }

//    public static void main(String[] args) {
//        System.out.println(RandomUtil.randomNumbers(4));
//        System.out.println(RandomUtil.randomNumbers(4));
//        System.out.println(RandomUtil.randomNumbers(4));
//        System.out.println(RandomUtil.randomNumbers(4));
//        System.out.println(RandomUtil.randomNumbers(4));
//    }

}
  